package com.bjc.principle.absfactory.order;

import com.bjc.principle.absfactory.pizza.*;

/**
 * @program: DesignPattern
 * @description:
 * @author: bjc
 * @create: 2020-12-16 21:03
 */
public class LDFactory implements AbsFactory {
    public Pizza createPizza(String orderType) {
        System.out.println("使用的是抽象工厂模式");
        Pizza pizza = null;
        if ("cheese".equals(orderType)){
            pizza = new LDCheesePizza();
        }else if ("pepper".equals(orderType)){
            pizza = new LDPepperPizza();
        }
        return pizza;
    }
}
